// pages/result/result.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
  
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
  
  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
    var that = this;
    wx.getStorage({
      key: 'm_data',
      success: function (res) {
        var res_data = res.data.data;
        that.setData({
          collar_opening: res_data.collar_opening,
          should_width: res_data.should_width,
          front_length: res_data.front_length,
          chest_width: res_data.chest_width,
          processed_middle_waisted: res_data.middle_waisted,
          sleeve_length: res_data.right_sleeve,
          swing_around: res_data.swing_around,
          arm_width: res_data.arm_width,
          right_wrist_width: res_data.right_wrist_width
        })
      }
    })
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function (res) {
    if (res.from === 'button') {
      // 来自页面内转发按钮
      // console.log(res.target)
    }
    return {
      title: '智能量体小程序',
      path: '/pages/index/index',
      success: function (res) {
        // 转发成功
        // console.log("转发成功")
      },
      fail: function (res) {
        // 转发失败
        // console.log("转发失败")
      }
    }
  },
  again:function(){
      wx.redirectTo({
      url: '../selecte/selecte'
    })
  }
  
})